﻿@model List<DLULearningNetworkModel.FriendNotification>
@using DLULearningNetwork.Libs;
@using DLULearningNetworkModel;
@if (Model != null && Model.Count != 0)
{
    <ul>
        @foreach (DLULearningNetworkModel.FriendNotification fn in Model)
        {
            <li NotificationID="@fn.FriendNotificationID_u" typeNotification="friend">
                <div class="record" style="clear: both; border-bottom: 1px solid green; padding: 5px 0 5px 5px;">
                    @if (fn.Type_i == (int)EnumFriendNotificationType.Accept)
                    { 
                        <div style="float: left; padding-right: 3px; width: 40px;">
                            <a href="/UserPage/UserHome/@fn.FriendReference.Value.Account1Reference.Value.Nickname_s" onclick="HasReadNotification('@fn.FriendNotificationID_u','friend')">
                                <img src="@DLULearningNetwork.Libs.StringHelper.GetImageUrl(fn.FriendReference.Value.Account1Reference.Value.Avatar_s, 2)" style="width: 40px; height: 40px; padding-right: 3px;" />
                            </a>
                        </div>
                        <div style="vertical-align: top; position: relative; display: block;">
                            <a href="#" name="checkNotification" style="display: none; margin: 0; padding: 0;
                                float: right;">
                                <img src="../../Content/Images/check.png" title="Xóa" />
                            </a><span style="display: block;width:210px"><a href="/UserPage/UserHome/@fn.FriendReference.Value.Account1Reference.Value.Nickname_s" onclick="HasReadNotification('@fn.FriendNotificationID_u','friend')">@fn.FriendReference.Value.Account1Reference.Value.LastName_s
                                @fn.FriendReference.Value.Account1Reference.Value.FirstName_s</a></span>đã đồng ý kết bạn
                        </div>
                                               
                        <div style="clear: both;">
                        </div>
                    }
                    else
                    { 
                        <div style="float: left; padding-right: 3px; width: 40px;">
                            <a href="/UserPage/UserHome/@fn.FriendReference.Value.AccountReference.Value.Nickname_s" onclick="HasReadNotification('@fn.FriendNotificationID_u','friend')">
                                <img src="@DLULearningNetwork.Libs.StringHelper.GetImageUrl(fn.FriendReference.Value.AccountReference.Value.Avatar_s, 2)" 
                    style="width: 40px; height: 40px; padding-right: 3px;" />
                            </a>
                        </div>
                        <div style="vertical-align: top; position: relative; display: block;">
                            <a href="#" name="checkNotification" style="display: none; margin: 0; padding: 0;
                                float: right;">
                                <img src="../../Content/Images/check.png" title="Xóa" />
                            </a>
                            <span style="display: block;width:210px"><a href="/UserPage/UserHome/@fn.FriendReference.Value.Account1Reference.Value.Nickname_s" onclick="HasReadNotification('@fn.FriendNotificationID_u','friend')">@fn.FriendReference.Value.AccountReference.Value.LastName_s
                                @fn.FriendReference.Value.AccountReference.Value.FirstName_s</a></span>
                                đã gửi yêu cầu kết bạn ?
                                <a href="#" style="color: Green;" onclick="return BoxAcceptFriendRelation('@fn.FriendID_u',this)">Đồng ý</a>
                        </div>
                        <div style="clear: both;">
                        </div>
                    }
                </div>
            </li>
        }
    </ul>
}
else
{ 
    <p name="noMore">
        Chưa có thông báo mới</p>
}